import wepy from 'wepy';
function http(url, data, method) {
  return wepy.request({
    // url: `https://app.fengchengtianxia.com${url}`,
    url: `https://test.fengchengtianxia.com${url}`,
    // url: `http://114.55.170.78${url}`,
    data, //请求的参数",
    method,
    header: {},
    dataType: 'json', //如果设为json，会尝试对返回的数据做一次 JSON.parse
  })
}
export default {
  post: (url, data) => http(url, data, "POST"),
  get: (url, data) => http(url, data, "GET"),
  delete: (url, data) => http(url, data, "DELETE"),
  put: (url, data) => http(url, data, "PUT"),
}